﻿using System.Linq;
using CodeBadger.GasMileage.Models;

namespace CodeBadger.GasMileage.ViewModels
{
    public class ListViewModel : ViewModel
    {
        public Notebook Entries { get; set; }

        public ListViewModel()
        {
            Entries = new Notebook();
        }

        public void Load()
        {
            var entries = CurrentApp.UserNotebook.OrderByDescending(x => x.Date);
            Entries.AddRange(entries);
        }
    }
}
